<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/amazeui.min.css" />
		<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/hy.admin.css" />
		<style type="text/css">
			.am-slider-default{ box-shadow: none;}
			
		</style>
	</head>

	<body>
		<div class="am-g">
         {include file='../Common/hy_header.html'}
			<div class="am-u-md-8 am-u-end">
				<form class="am-form am-form-horizontal hy-js-form">
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">标题:</label>
						<div class="am-u-sm-9">
							<input type="text" name="name" value="{$wxmenu['name']}" placeholder="非空">
						</div>
					</div>
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">父菜单:</label>
						<div class="am-u-sm-9">
							<select name="parent_id">
								<option value="0">请选择父菜单</option>
								{foreach from=$cat_list item=list}    
								<option {if $list.id==$wxmenu.parent_id} selected="selected" {/if} value="{$list.id}">{$list.name}</option>
								{/foreach}
							</select>
							<input type="hidden" name="old_pid" id="old_pid" value="{$wxmenu.parent_id}" />
						</div>
					</div>
					
					
					<div class="am-form-group">
						<label for="user-name" class="am-u-sm-3 am-form-label">类型:</label>
						<div data-am-button class="am-btn-group am-u-sm-9 hy-js-menutab">
									<label data-target="#link1" class="hy-js-menubtn am-btn am-btn-default am-btn-xs {if $wxmenu.type}{if $wxmenu.type eq 0} am-active {else}{/if}{else} am-active {/if} ">
										<input   type="radio" {if $wxmenu.type}{if $wxmenu.type eq 0} checked="checked" {else}{/if}{else} checked="checked" {/if}  name="type" value="0" id="option1">关联信息
									</label>
									<label data-target="#link2" class="hy-js-menubtn am-btn am-btn-default am-btn-xs {if $wxmenu.type eq 1} am-active {else}{/if} ">
										<input   type="radio" name="type" {if $wxmenu.type eq 1} checked="checked" {else}{/if}  value="1" id="option2"> 链接
									</label>
								
						</div>
					</div>
					<div id="link2" {if $wxmenu.type eq 1}style='display: block;'{else}{/if} class="am-form-group hy-js-menupanel hy-hide">
						<label for="user-name" class="am-u-sm-3 am-form-label">链接:</label>
						<div class="am-u-sm-9">
							<input type="text" name="url" {if $wxmenu['url']} value="{$wxmenu['url']}" {else}value="http://"{/if} placeholder="">
						</div>
					</div>
					<div id="link1"  {if $wxmenu.type}{if $wxmenu.type eq 0} style='display: block;' {else}{/if}{else} style='display: block;' {/if} class="am-form-group  hy-js-menupanel hy-hide">
						<label for="user-name" class="am-u-sm-3 am-form-label">关联信息:</label>
						<div class="am-u-sm-9">
							<select name="rule">
								{foreach from=$rule_list item=list}    
								<option {if $list.id==$wxmenu.rule} selected="selected" {/if} value="{$list.id}">{$list.name}</option>
								{/foreach}
							</select>
						</div>
					</div>
					<div class="am-form-group">
						<div class="am-u-sm-9 am-u-sm-push-3">
							<input type="hidden" name="id"  value="{$wxmenu.id}" />
							<button type="button" class="am-btn am-btn-primary hy-js-submit">{$_L.SAVE}</button>
						</div>
					</div>
				</form>
			</div>
		{include file='../Common/hy_footer.html'}
		<script type="text/javascript">
			 hy_submit('index.php?g=admin&m=wxmenu&a=update_menu');
		</script>
	</body>
	<
</html>